public with sharing class TestController {

   user us = [Select Id,Name,Username from User where Id = :ApexPages.currentPage().getParameters().get('Id')];
 
    String Name = us.Name;
    String UserName = us.username;
    
    public TestController(ApexPages.StandardController controller) {       
        this.values = new ExportValue[] {
            new ExportValue(Name,username)
        };        
      }
    public ExportValue[] getExportValues() {
        return values;
    }
    public class ExportValue {
      public ExportValue(String id, String name) {
            this.id = id;
            this.name = name;
         }    
      
        public String id { get; private set; }
        public String name { get; private set; }        
      
     }    
   private final ExportValue[] values;
  }